<style>
	.logo img{cursor: pointer;max-width: 300px;max-height: 150px;}
</style>
<div class="row" style="margin-bottom: 20px;border-bottom: 1px solid #EEEEEE;">
<a href="{:U('Sys/index')}"><button type="button" class="btn btn-primary active">网站配置</button></a>
<a href="{:U('Sys/seo')}"><button type="button" class="btn btn-primary">SEO优化</button></a>
<a href="{:U('Sys/nav')}"><button type="button" class="btn btn-primary">导航管理</button></a>
<a href="{:U('Sys/updateCount')}"><button type="button" class="btn btn-primary">更新统计</button></a>
<a href="{:U('Sys/keyworld')}"><button type="button" class="btn btn-primary">关键词生成</button></a>
<a href="{:U('Sitemap/index')}"><button type="button" class="btn btn-primary">生成地图</button></a>
</div>
<div class="row">
	<div class="panel panel-primary">
	   <div class="panel-heading">
	      <h3 class="panel-title">站点设置</h3>
	   </div>
	   <div class="panel-body">
	      <form role="form" method="post" id="setting_form" action="{:U('Sys/index')}" enctype="multipart/form-data">
			   <div class="form-group">
			      <label for="sitename">网站名称</label>
			      <input type="hidden" name="id" value="{$data['id']}"/>
			      <input type="text" class="form-control" name="sitename" id="sitename" placeholder="请输入站点名称" value="{$data['sitename']}">
			   </div>
			   <label for="name">网站状态</label>
				<div class="form-group">
				   <label class="checkbox-inline">
				      <input type="radio" name="isopen" value="1" <if condition="$data['isopen'] eq 1">checked="checked"</if> id="open">打开
				   </label>
				   <label class="checkbox-inline">
				      <input type="radio" name="isopen" value="0" <if condition="$data['isopen'] eq 0">checked="checked"</if> id="close">关闭
				   </label>
				</div>
			<div class="form-group close_show" style="display: none;">
			    <label for="statement">站点关闭说明</label>
			    <textarea class="form-control" rows="3" id="statement" name="statement">{$data['statement']}</textarea>
			  </div>
			  <div class="form-group">
			    <label for="tongji">站点统计代码</label>
			    <textarea class="form-control" rows="3" id="tongji" name="tongji">{$data['tongji']}</textarea>
			  </div>
			  <div class="form-group">
			    <label for="copyright">底部声明[支持HTML代码]</label>
			    <span class="help-block">如果使用HTML代码，建议使用百分比的形式限定DIV等HTML标签以适应响应式布局</span>
			    <textarea class="form-control" rows="3" id="copyright" name="copyright">{$data['copyright']}</textarea>
			  </div>
			  <div class="form-group">
			      <label for="beian">备案号</label>
			      <input type="text" class="form-control" name="beian" id="beian" placeholder="请输入网站备案号" value="{$data['beian']}">
			   </div>
			  <div class="form-group">
					<button type="button" id="submitBtn" class="btn btn-default">提交设置</button>
			  </div>
			 <!--  <button type="submit" class="btn btn-default">提交</button>-->
			</form>
	   </div>
	</div>
	
	
</div>
<script>
	$(function(){
		$('.logo').click(function(){
			$("#logo").trigger('click');
		});
		
		/*站点开关*/
		$('#open').click(function(){
			$('.close_show').hide();
		});
		$('#close').click(function(){
			$('.close_show').show();
		});
		
		$('#submitBtn').click(function(){
			if ($('#sitename').val()=='') {
				alert('站点名称不能为空');
				return false;
			} else{
				$('#setting_form').submit();
			}
		});
		
		
		
		
		
	});
</script>
